import request from '@/utils/request'
// //获取大文件上传url
export function getUpldUrl(options){   
  return request({     
    url:'/upload/muti/init',
    method:'post',
    data:options
  })
}




// 获取小文件的预上传url
export function getUpFileUrl(params){
    return request({
      url:"/upload/simple/presigned_url",
      method:'get',
      params

    })
}
// 保存小文件至数据库
export function saveUpSfile(fileId){
  return request({
    url:"/upload/simple/to_db",
    method:'post',
    data:{
      "file_id":fileId
    }
  })
}



//合并分片
export function chunkMerge(options){   
  return request({     
    url:"/upload/muti/merge",
    method:'post',
    data:options
  })
}




//删除分片
export function delChunk(options){   
    return request({     
      url:"/oss/minion/upload/clearTask",
      method:'post',
      data:options
    })
}

//删除上传成功的文件
export function delMinFile(options){   
  return request({     
    url:"/oss/minion/upload/deleteFile",
    method:'post',
    data:options
  })
}


//获取下载url
export function minIoUploadUrl(ossId){   
  return request({     
    url:"/oss/minion/download/"+ossId,
    method:'get' 
  })
}


// 预览接口
export function previewUrl(options){   
  return request({     
    url:"/upload/preview",
    method:'post',
    data:options
  })
}